import axios from 'axios'

const instance = axios.create({
  baseURL: 'http://localhost:3000/'
})

instance.interceptors.request.use((config) => {
  config.headers.authorization = sessionStorage.getItem('token')
  return config;
}, () => {
  return Promise.reject()
})

instance.interceptors.response.use((response) => {
  return response
}, (err) => {

})

export default instance